package security.IntrusionDetection.Base;

/**
 * Email object designed to send an email to an account and warn a user of unusual login pattern.
 * @author Danut
 *
 */
public class Email {

	private String toSend; //address of the receiver 
	private String sender="admin@2DV103.net"; //address of the system
	private String textBody; //body of the message
	private boolean isEmailSent=false;
	
	public void setToSend(String str){toSend = str;}
	public void setTextBody(String str){textBody=str;}
	public void setEmailSentStatus(boolean flag){isEmailSent = flag;}
	
	public String getToSend(){return toSend;}
	public String getTextBody(){return textBody;}
	public String getSender(){return sender;}
	public boolean getEmailSentStatus(){return isEmailSent;}
	/**
	 * This method will get a message ready for sending and send it afterwards.
	 */
	public void sendEmail(){
		System.out.printf("Message has been sent to %s",toSend);
	}
}
